﻿@model SysClient
@{
	var area = Common.SysArea.FirstOrDefault(p => p.ID.Equals(Model.CitySysNo)) ??
		Common.SysArea.FirstOrDefault(p => p.ID.Equals(Model.ProvinceSysNo)) ??
		new SysArea();
	var birthplace = area.ProvinceName + area.CityName;
	var typeofwork = new SelectList((Model.TypeOfWorking ?? "").Split(new[] { ',', '，' }, StringSplitOptions.RemoveEmptyEntries));
	var gender = new SelectList(Common.Dictionary.Where(p => p.Category.Equals("Gender")).OrderBy(p => p.Sort), "Worth", "Caption", Model.Gender);
	var education = new SelectList(Common.Dictionary.Where(p => p.Category.Equals("Education")).OrderBy(p => p.Sort), "Worth", "Caption", Model.Education);
	var tele = new SelectList((Model.Telphone ?? "").Split(new[] { ',', '，' }, StringSplitOptions.RemoveEmptyEntries));
}
<div class="ui-cell">
	<label>姓名</label>
	@Html.TextBox("ClientName", Model.Name)
</div>
<div class="ui-cell">
	<label>性别</label>
	@Html.DropDownList("ClientSex", gender)
</div>
<div class="ui-cell">
	<label>出生日期</label>
	@Html.TextBox("ClientBirthday", string.Format("{0:yyyy-MM-dd}", Model.Birthday))
</div>
<div class="ui-cell">
	<label>籍贯</label>
	@Html.TextBox("ClientBirthplace", birthplace)
</div>
<div class="ui-cell">
	<label>电话</label>
	@(tele.Any() ? Html.DropDownList("ClientPhone", tele) : Html.TextBox("ClientPhone", Model.Telphone))
</div>
<div class="ui-cell">
	<label>学历</label>
	@Html.DropDownList("ClientEducation", education)
</div>
<div class="ui-cell">
	<label>工种</label>
	@(typeofwork.Any() ? Html.DropDownList("ClientWork", typeofwork) : Html.TextBox("ClientWork"))
</div>
<div class="ui-cell">
	<label>工龄</label>
	@Html.TextBox("ClientWorkExpress", Model.WorkExpress)
</div>
